<?php	/* gmslOpenSource 2008 */
/*
----------------------------------------------------------------------------------------
	Project name:		gmslappcore
	Section:		security
----------------------------------------------------------------------------------------
	Script name:		security.php
	Script location:	./gmslappcore/security
	Script version:		2.1
----------------------------------------------------------------------------------------
	Script info:		This page will select which sort of security a page
				needs, then call the right file.
	Script dependencies:
 				~The variable $page['security'] to be set (if it is
 				not set then script will just die).
----------------------------------------------------------------------------------------
	This script is part of the gmslappcore system which is released
	under the GNU licese.
	Copyright: (c) 2008 Andrew Cornford (groupmsl.co.uk)
	Email: projects@groupmsl.co.uk
	Website: www.groupmsl.co.uk?section=cms&page=view&t=gmslappcore&f=groupmsl Open Source/gmslappcore
----------------------------------------------------------------------------------------
	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------------------
*/
echo 'xxxxxxxxxxxxxxx'.$page['security'];
echo $_SESSION['gmslappcore_user_type'];
if($page['security']=='none') $page['security_users']='OK';
elseif(($page['security']=='admin')&&(($_SESSION['gmslappcore_user_type']=='Admin')||($_SESSION['gmslappcore_user_type']=='Super'))) $page['security_users']='Admin';
elseif(($page['security']=='not_logged_in')&&(($_SESSION['gmslappcore_logged_in']!='TRUE')||($_SESSION['gmslappcore_user_type']=='Super'))) $page['security_users']='logged in';


elseif((($page['security']=='test')&&($_SESSION['gmslappcore_user_type']!='Admin'))&&(($page['security']=='test')&&($_SESSION['gmslappcore_user_type']!='Super'))) $page['security_users']='test';
else $page['security_users']='OK' ?>
